package com.sci99.script;

import java.io.IOException;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

import org.apache.ibatis.io.Resources;

public class PythonT {
	public static void main(String[] args) {
		ScriptEngine engine = new ScriptEngineManager()
				.getEngineByName("python");
		System.out.println(engine.toString());
		try {
			engine.eval(Resources.getResourceAsReader("test.py"));
		} catch (ScriptException se) {
			System.out.println(se.getMessage());
		} catch (IOException ie) {
			System.out.println(ie.getMessage());
		}
	}
}
